#!/bin/bash

IMAGE_NAME=${IMAGE_NAME:-admin-web}
echo "IMAGE_NAME: ${IMAGE_NAME}"

IMAGE_TAG=${IMAGE_TAG:-latest}
echo "IMAGE_TAG: ${IMAGE_TAG}"

docker build -t $IMAGE_NAME:${IMAGE_TAG} -f ./docker/Dockerfile ./dist/

# 添加 Node.js 环境变量（适用于旧版本 Node）
export NODE_OPTIONS='--experimental-vm-modules'

IMAGE_NAME=${IMAGE_NAME:-admin-web}
echo "IMAGE_NAME: ${IMAGE_NAME}"
# ... existing code ...

#docker push ${IMAGE_NAME}:${IMAGE_TAG}
#docker rmi ${IMAGE_NAME}:${IMAGE_TAG}